#include "mainwindow.h"

#include <QApplication>
#include <QSettings>
#include <QTranslator>

QSettings settings;

int main(int argc, char* argv[])
{
    QApplication a(argc, argv);

    QTranslator translator;
    QSettings settings("settings.ini", QSettings::IniFormat);
    if (settings.contains("language")) {
        QString language = settings.value("language").toString();
        translator.load(nameToQm[language]);
        a.installTranslator(&translator);
    }

    MainWindow w;
    w.show();
    return a.exec();
}
